// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import Router from 'vue-router'
//  // eslint-disable no-new

import acMarquee from '@comp/acMarquee.vue'

const Components = {
  acMarquee
}
// eslint-disable no-new
let config = {
  start: function(option){
    Vue.use(Router)
    new Vue(Object.assign(option, {router: new Router(option.router)}));
    //全局注册组件
    Object.keys(Components).forEach(name => {
      Vue.component(name,Components[name]);
    });
    Vue.config.productionTip = false

    //初始化Vue
    new Vue(option)
  }
}

// config.start({
//   routes: [
//     {
//       path: '/hello',
//       name: 'HelloWorld',
//       component: acMarquee
//     }
//   ]
// });

export default config

